package com.ps.dao.dept;

import java.sql.Timestamp;
import java.util.List;
import org.hibernate.LockMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.ps.dao.BaseDaoSupport;
import com.ps.pojo.dept.Department;

/**
 * A data access object (DAO) providing persistence and search support for
 * Department entities. Transaction control of the save(), update() and delete()
 * operations can directly support Spring container-managed transactions or they
 * can be augmented to handle user-managed Spring transactions. Each of these
 * methods provides additional information for how to configure it for the
 * desired type of transaction control.
 * 
 * @see com.ps.pojo.dept.Department
 * @author MyEclipse Persistence Tools
 */

public class DepartmentDAO extends BaseDaoSupport<Department> {

	// property constants
	public static final String AREA_ID = "areaId";
	public static final String NAME = "name";
	public static final String FATHER_ID = "fatherId";
	public static final String REMARK = "remark";
	public static final String INPUTER_ID = "inputerId";

	protected void initDao() {
		// do nothing
	}

	public static DepartmentDAO getFromApplicationContext(ApplicationContext ctx) {
		return (DepartmentDAO) ctx.getBean("DepartmentDAO");
	}
}